Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Catch BrokenPipeError from metrics server, and log as a warning #14072

Merged
merged 3 commits into from
Oct 7, 2022

Conversation

DMRobertson
Copy link
Contributor

Fixes #14066, I think?

@DMRobertson
Copy link
Contributor Author

Wtf---why is the debian package test run now failing with Synapse 1.69.0rc1 does not provide the feature 'url_preview'??

@DMRobertson DMRobertson force-pushed the dmr/catch-metric-pipe-errors branch from 8cf89cf to 3f13fe8 Compare October 6, 2022 17:52
@DMRobertson DMRobertson marked this pull request as ready for review October 6, 2022 18:29
@DMRobertson DMRobertson requested a review from a team as a code owner October 6, 2022 18:29
Comment on lines +229 to +232
except BrokenPipeError as e:
logger.warning(
"BrokenPipeError when serving metrics (%s). Did Prometheus restart?", e
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a warning is the right logging level to use here.

But do we know what's causing the socket to close before we send the response on matrix.org?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would guess the prometheus scraper is occasionally restarted? Pure speculation though.

@DMRobertson DMRobertson merged commit 1fa2e58 into develop Oct 7, 2022
@DMRobertson DMRobertson deleted the dmr/catch-metric-pipe-errors branch October 7, 2022 12:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sentry noise created by BrokenPipeError when logging (legacy?) metrics
2 participants